<div class="issue-workflow-design container-fluid">

  <div class="row">
    <div class="edit-toolbar col-xl-12">
      <div class="title">
        <span>{{model.name}}</span>
      </div>
      <div class="buttons">
        <button (click)="back()" type="button" class="btn btn-secondary btn-with-icon btn-sm back">
          <i class="fa fa-arrow-circle-left"></i>返回
        </button>
      </div>
    </div>
  </div>
  <hr/>

  <div>

    <table class="table table-hover table-bordered">
      <thead>
        <tr>
          <td class="table-header-td">
            <table class="table-header">
              <thead>
              <tr class="a-ca-ht-day">
                <td></td>
                <td>目标状态</td>
              </tr>
              <tr class="a-ca-ht-worker">
                <td>起始状态</td>
                <td></td>
              </tr>
              </thead>
            </table>
          </td>
          <td *ngFor="let item of statuses;" class="col-{{item.id}}"
              (mouseenter)="enterCol(item.id);" (mouseleave)="leaveCol(item.id);">{{item.label}}</td>
        </tr>
      </thead>

      <tbody>
      <tr *ngFor="let src of statuses;">
        <td>{{src.label}}</td>
        <td *ngFor="let dict of statuses;" class="acts-col col-{{dict.id}}" [class.na]="src.id == dict.id"
            (mouseenter)="mouseenter($event);" (mouseleave)="mouseleave($event);">

          <div *ngIf="src.id != dict.id">
            <div *ngIf="tranMap[src.id+'-'+dict.id] as tran" class="tran">
              <span (click)="editTran(tran)" class="link">{{tran.name}}</span>

              <div class="acts link">
                <span (click)="editTran(tran)"><i class="fa fa-pencil"></i></span>
                <span (click)="removeTran(tran)"><i class="fa fa-trash"></i></span>
              </div>
            </div>

            <div *ngIf="!tranMap[src.id+'-'+dict.id]">
              <div class="acts link">
                <span (click)="addTran(src.id, dict.id)"><i class="fa fa-plus"></i></span>
              </div>
            </div>
          </div>
        </td>
      </tr>
      </tbody>
    </table>

  </div>

</div>

<pop-dialog #modalWrapper (confirm)="delete()" [title]="'提示'">
  确认删除名为"{{currTran.name}}"的转换?
</pop-dialog>
